<include file="Index/header"/>
<script language="javascript" type="text/javascript" src="__PUBLIC__/My97DatePicker/WdatePicker.js"></script>
       <style> 
.teacher {
    margin-left: 20px;   
    border:solid 1px #ccc;
    
        
    }    
    .teacher td{
        height:50px;
        margin-left: 20px;
        width:500px;
        border:solid 1px #ccc;
        line-height: 50px;
    }
    .teacher select{
        
        margin-left: 20px; 
    }

   .teacher  input{
  
     margin-left: 20px;   
        
    }
   .input-xlarge{
      width:500px;
      height:100px;
        
        
    }
    </style>
    
  <include file="Index/left"/>
    
    
    <div class="content">
        
        <div class="header">
            
            <h1 class="page-title">编辑资料</h1>
        </div>
        
                <ul class="breadcrumb">
            <li><a href="{:U('Index/Index')}">首页</a> <span class="divider">/</span></li>
            <li><a href="#">课程安排</a> <span class="divider">/</span></li>
            <li class="active">班次信息管理</li>
        </ul>

        <div class="container-fluid">
            <div class="row-fluid">
                    

<div class="well" id='well2'>
    <ul class="nav nav-tabs">
      <li class="active"><a href="#home" data-toggle="tab">修改班次信息</a></li>

    </ul>
    <div id="myTabContent" class="tab-content">
      <div class="tab-pane active in" id="home">
          <form id="tab" >
  <table width="800px" border="0" class="teacher">
            <tr><td colspan="2">  班次编号
          <input type="text" name="scheid" class="input-xlarge" value='{$us.scheid}' id="scheid"  maxlength="9"><span class="alert alert-danger" style="width:100px; display:none" id="error"></span></td></tr>           
        <tr><td colspan="2">  主办单位
          <input type="text" name="zbdw" class="input-xlarge" value='{$us.zbdw}' id="scheid"><span class="alert alert-danger" style="width:100px; display:none" id="error"></span></td></tr>           
       
            <tr><td colspan="2">   班次名称
               <input type="hidden" value="{$us.id}" name="id" class="input-xlarge">
       <input type="text" value="{$us.schename}" name="schename" class="input-xlarge"></td></tr>
      <tr>
      <td colspan="2"> 班次类型
         <select name="classlb" id="classlb">
              <option value="{$us.classlb}">{$us.classlb}</option>
    <volist name="dqlist" id="vb">
          <option value="{$vb.dict_name}">{$vb.dict_name}</option>
    </volist>
         </select></td></tr>
      <tr> <td>  接班老师
         <select name="jteacher" id="jteacher">
             <option value="{$us.jteacher}">{$us.jteacher}</option>
    <volist name="telist" id="vc">
          <option value="{$vc.tname}">{$vc.tname}</option>
    </volist>
         </select></td>
         <td> 带班老师
            <select name="dteacher" id="dteacher">
                <option value="{$us.dteacher}">{$us.dteacher}</option>
    <volist name="telist" id="vd">
          <option value="{$vd.tname}">{$vd.tname}</option>
    </volist>
            </select></td></tr>
  <tr><td colspan="2">   备&nbsp;&nbsp;&nbsp;&nbsp;注&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
               <textarea name="remark" cols="50" rows="6" id="remark" class="input-xlarge">{$us.remark}</textarea></td></tr>
      <!-- <tr><td colspan="2">   备&nbsp;&nbsp;&nbsp;&nbsp;注2&nbsp;&nbsp;&nbsp;&nbsp;
               <textarea cols="50" rows="6" name="crc" class="input-xlarge">{$us.crc}</textarea></td></tr>--></table>
        <br />
         <button style="margin-left:280px" type="button" class="btn btn-primary" onclick="tj()">确&nbsp;&nbsp;&nbsp;&nbsp;定</button>
		 <button type="button" class="btn btn-primary"  onclick="history.go(-1)">取&nbsp;&nbsp;&nbsp;&nbsp;消</button>
    </form>
      </div>
  
      </div>
  </div>

</div>



                    
                        <hr>

                    
                    </footer>
                    
            </div>
        </div>
    </div>
   <script type="text/javascript">  
function tj(){
    var remark=$('#remark').val().length;
if(remark>100){
    
   alert('备注超过最大字数限制'); 
   return
}
var bcbh=$('#scheid').val();
if(bcbh === ''){
    alert('班次编号不能为空');
   $('#error').show(); 
 $('#error').text('班次编号不能为空');   
 exit();   
}
   $.ajax({
                type: "POST",
                url: "__CONTROLLER__/Classesxg",
           
                cache: false,
                data: $('#tab').serialize(),
         
                    success: function(data) {
                switch(data){
                           
                case '0':
                alert('修改成功');
                 window.location.replace("__CONTROLLER__/Classes") 
                break;
                case '1': 
                 alert('修改失败');
           
                break;
        
            default:
                alert(data);
        }
              
                       }
                    
        
        
        
        })

    
}
</script>

    <script src="__PUBLIC__/lib/bootstrap/js/bootstrap.js"></script>
    <script type="text/javascript">
        $("[rel=tooltip]").tooltip();
        $(function() {
            $('.demo-cancel-click').click(function(){return false;});
        });
    </script>
    
  </body>
</html>


